package com.ruoyi.shop.systematic.storage.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.mall.common.domain.DtsStorage;
import com.ruoyi.mall.common.mapper.DtsStorageMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.shop.systematic.storage.service.IDtsStorageService;

/**
 * 对象存储Service业务层处理
 *
 * @author ruoyi
 * @date 2025-04-22
 */
@Service
public class DtsStorageServiceImpl implements IDtsStorageService
{
    @Autowired
    private DtsStorageMapper dtsStorageMapper;

    /**
     * 查询对象存储
     *
     * @param id 对象存储主键
     * @return 对象存储
     */
    @Override
    public DtsStorage selectDtsStorageById(Long id)
    {
        return dtsStorageMapper.selectDtsStorageById(id);
    }

    /**
     * 查询对象存储列表
     *
     * @param dtsStorage 对象存储
     * @return 对象存储
     */
    @Override
    public List<DtsStorage> selectDtsStorageList(DtsStorage dtsStorage)
    {
        return dtsStorageMapper.selectDtsStorageList(dtsStorage);
    }

    /**
     * 新增对象存储
     *
     * @param dtsStorage 对象存储
     * @return 结果
     */
    @Override
    public int insertDtsStorage(DtsStorage dtsStorage)
    {
        return dtsStorageMapper.insertDtsStorage(dtsStorage);
    }

    /**
     * 修改对象存储
     *
     * @param dtsStorage 对象存储
     * @return 结果
     */
    @Override
    public int updateDtsStorage(DtsStorage dtsStorage)
    {
        dtsStorage.setUpdateTime(DateUtils.getNowDate());
        return dtsStorageMapper.updateDtsStorage(dtsStorage);
    }

    /**
     * 批量删除对象存储
     *
     * @param ids 需要删除的对象存储主键
     * @return 结果
     */
    @Override
    public int deleteDtsStorageByIds(Long[] ids)
    {
        return dtsStorageMapper.deleteDtsStorageByIds(ids);
    }

    /**
     * 删除对象存储信息
     *
     * @param id 对象存储主键
     * @return 结果
     */
    @Override
    public int deleteDtsStorageById(Long id)
    {
        return dtsStorageMapper.deleteDtsStorageById(id);
    }
}
